/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.infrastructure.metadata.io;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 指标
 *
 * @author anle5
 * @since 2024/9/8 21:49
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "响应体指标")
public class Metric implements Serializable {
    @Serial
    private static final long serialVersionUID = -5965031349224499130L;

    /**
     * 前端通过该字段判断是否处理成功
     * true 处理成功, false 处理失败
     */
    @Schema(description = "业务处理成功标识")
    private boolean success;

    /**
     * 请求的唯一识别id
     */
    @Schema(description = "请求的唯一识别id")
    private String requestId;

    /**
     * 消息码
     */
    @Schema(description = "消息码")
    private String msgCode;

    /**
     * 消息描述 语言国际化后的对应msgCode的描述
     */
    @Schema(description = "消息描述")
    private String msgDesc;

    /**
     * 响应时间
     */
    @Schema(description = "响应时间")
    private Date completedTime;
}
